fs/zfs: Check if returned pointer for allocated memory is NULL
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 07:17:01 +0000 (07:17 +0000)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit528b8c2fb2e72844457ee3cf512c8e420ab98de5
tree6fd6f21cdf5adcbf7ced7762f6bd11c6907ab790
parent415025a4f93aff4b9d5d96e61fbac570120dc29f
fs/zfs: Check if returned pointer for allocated memory is NULL

When using grub_malloc() or grub_zalloc(), these functions can fail if
we are out of memory. After allocating memory we should check if these
functions returned NULL and handle this error if they did.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-zfs-Check-if-returned-pointer-for-allocated-memory-is-.patch
grub-core/fs/zfs/zfs.c